<div style="height: 100%;" [busyIf]="primengTableHelper.isLoading">
    <div class="form-group form-md-line-input form-md-floating-label no-hint" *ngIf="!batch?.deliveryRecord" style="margin:20px 0">
        <div class="col-md-4" style="float:left">
            <label>投产数量: </label>
            {{ pipe.amountPlanned }}
        </div>
        <div class="col-md-4" style="float:left">
            <label>合格证: </label>
            {{ batch.certificateId }}
        </div>
        <div class="col-md-4" style="float: right;">
            <label>合格数量: </label>
            {{ batch.certificateQuantity }}
        </div>
    </div>

    <div class="form-group form-md-line-input form-md-floating-label no-hint">
        <div class="col-md-12">
            <label>验收数量: </label>
            <input class="form-control" name="certificateQuantity" type="number" min="0" [(ngModel)]="deliveryAmount" />
        </div>
        <div class="col-md-12">
            <label>报废数量: </label>
            <input class="form-control" name="certificateQuantity" type="number" min="0" [(ngModel)]="noPassedAmount"/>
        </div>
        <div class="col-md-12">
            <label>超差数量: </label>
            <input class="form-control" name="certificateQuantity" type="number" min="0" [(ngModel)]="quantityAmount"/>
        </div>
    </div>

    <div style="padding: 15px; margin: 20px 0">
            <label>外协确认单信息: </label>
        <p-table [value]="outsourcing" selectionMode="single" [(selection)]="selectedoutsourcing" dataKey="id"
            [scrollable]="true" scrollHeight="200px">
            <ng-template pTemplate="header">
                <tr>
                    <th style="width: 80px">供方单位</th>
                    <th style="width: 80px">申请单编号</th>
                    <th style="width: 80px">加工单编号</th>
                    <th style="width: 80px">任务编号</th>
                    <th style="width: 80px">产品名称</th>
                    <th style="width: 80px">产品图号</th>
                    <th style="width: 80px">产品编码</th>
                    <th style="width: 80px">加工数量</th>
                    <th style="width: 80px">加工状态</th>
                    <th style="width: 80px">进度要求</th>
                    <th style="width: 80px">材料提供</th>
                    <th style="width: 80px">单价</th>
                </tr>
            </ng-template>
            <ng-template pTemplate="body" let-rowData>
                <tr [pSelectableRow]="rowData">
                    <td style="width: 80px;word-wrap: break-word">
                        {{ rowData.supplierUnit }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.requisitionCode }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.orderCode }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.taskCode }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.taskName }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.picNo }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.productCode }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.processingAmount }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.processingStatus }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.editTime | momentFormat: 'YYYY-MM-DD' }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.materialSupply }}
                    </td>
                    <td  style="width: 80px;word-wrap: break-word">
                        {{ rowData.unitPrice }}
                    </td>
                </tr>
            </ng-template>
        </p-table>
    </div>

    <div class="row">
        <div class="col-lg-12">
            <button type="button" class="btn btn-sm btn-success float-right" (click)="save()" [buttonBusy]="saving"
                [busyText]="'确认中...'">
                <i class="fa fa-check-circle"></i>
                <span>确认</span>
            </button>
        </div>
    </div>
</div>